package controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import entity.Comment;
import service.CommentService;

@Controller
@CrossOrigin
@ResponseBody
@RequestMapping("/Comment")
public class CommentController {
	@Autowired
	CommentService commentService;
	@RequestMapping(path = "/comment",method = RequestMethod.POST)
	public List<Comment>  catelogAll() throws Exception{
		List<Comment> list=commentService.All();
		return list;
	}
}
